import { Canceler } from 'axios'
export enum ResultEnum {
  DATA_SUCCESS = 0,
  SUCCESS = 200,
  SERVER_ERROR = 500,
  SERVER_FORBIDDEN = 403,
  NOT_FOUND = 404,
  NO_PERMISSION = 401
}

export interface cancelTokenItem {
  cancel: Canceler
  name: string
}

export interface httpState {
  cancelTokenList: cancelTokenItem[]
  errRequestList: {
    requestId?: string
    status: string
    code: string
    msg: string
    // timestamp: string
    method: 'post' | 'get' | 'put' | 'delete'
    data: any
    url: string
    config: object
  }[]
}
